From a24e208fb704a22322ad5869dfc9eb09a7c2cc83 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 9 Jan 2008 10:11:31 +0000 Subject: [PATCH] x86_emulate: Correct RIP-relative addressing offset for SHLD/SHRD with immediate byte third operand. Signed-off-by: Keir Fraser --- xen/arch/x86/x86_emulate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/arch/x86/x86_emulate.c b/xen/arch/x86/x86_emulate.c index f894047068..07bc21f4ed 100644 --- a/xen/arch/x86/x86_emulate.c +++ b/xen/arch/x86/x86_emulate.c @@ -1064,6 +1064,9 @@ x86_emulate( /* Special case in Grp3: test has immediate operand. */ ea.mem.off += (d & ByteOp) ? 1 : ((op_bytes == 8) ? 4 : op_bytes); + else if ( (b == 0xf7) == 0xa4 ) + /* SHLD/SHRD with immediate byte third operand. */ + ea.mem.off++; break; case 1: ea.mem.off += insn_fetch_type(int8_t); -- 2.30.2